﻿<Window x:Class="WpfControlsLibrary.Ftp.FtpFolderBrowserDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wcl="clr-namespace:WpfControlsLibrary"
        Title="{LocText WpfControlsLibrary:Ftp:FolderBrowserDialogTitle}"
        Width="350"
        Height="430"
        MinWidth="350"
        MinHeight="350"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        ResizeMode="CanResize"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        WindowStyle="SingleBorderWindow">
	<Window.Resources>
		<wcl:BoolToVisibilityConverter x:Key="boolToVisibilityConverter" />
	</Window.Resources>
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<TextBlock Grid.Row="0"
		           Grid.Column="0"
		           Grid.ColumnSpan="2"
		           Margin="5"
		           Text="{Binding Description}" />

		<TreeView x:Name="treeViewFolders"
		          Grid.Row="1"
		          Grid.Column="0"
		          Grid.ColumnSpan="2"
		          Margin="5" />

		<Button x:Name="buttonCreateFolder"
		        Grid.Row="2"
		        Grid.Column="0"
		        Margin="5"
		        HorizontalAlignment="Left"
		        Content="{LocText WpfControlsLibrary:Ftp:FolderBrowserDialogNewFolder}"
		        Padding="10 0"
		        Visibility="{Binding ShowNewFolderButton,
		                             Converter={StaticResource ResourceKey=boolToVisibilityConverter}}" />
		<StackPanel Grid.Row="2"
		            Grid.Column="1"
		            HorizontalAlignment="Right"
		            Orientation="Horizontal">
			<Button x:Name="buttonOK"
			        Width="80"
			        Margin="5"
			        Content="{LocText WpfControlsLibrary:Ftp:FolderBrowserDialogOK}" />
			<Button x:Name="buttonCancel"
			        Width="80"
			        Margin="5"
			        Content="{LocText WpfControlsLibrary:Ftp:FolderBrowserDialogCancel}"
			        Padding="10 0" />
		</StackPanel>
	</Grid>
</Window>
